package org.springblade.modules.repair.vo.plan;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springblade.modules.repair.enums.PlanContentCheckTypeEnum;

/**
 * @author zcc
 * @version 1.0
 * @date 2021/10/16 16:24
 */
@ApiModel("最近计划详情model")
@Data
public class RecentlyPlanVo {

	private String planDesc;

	private String finishTime;

	private Integer planCheckType;

	public void setPlanCheckType(Integer planCheckType) {
		this.planCheckType = planCheckType;
		if (planCheckType != null) {
			if (planCheckType.equals(PlanContentCheckTypeEnum.HALF_MONTH.getId())) {
				this.planDesc = "半月保养";
			} else if (planCheckType.equals(PlanContentCheckTypeEnum.QUARTER.getId())) {
				this.planDesc = "季度保养";
			} else if (planCheckType.equals(PlanContentCheckTypeEnum.HALF_YEAR.getId())) {
				this.planDesc = "半年保养";
			} else if (planCheckType.equals(PlanContentCheckTypeEnum.YEAR.getId())) {
				this.planDesc = "年度保养";
			} else if (planCheckType.equals(PlanContentCheckTypeEnum.USER_DEFINED.getId())) {
				this.planDesc = "自定义保养";
			}
		}
	}
}
